#ifndef CONTROLLER_H
#define CONTROLLER_H

#include "includes.h"
#include "Plane.h"
#include "framework.h"
#include "EntityCamera.h"

class Controller
{

public:

	SDL_Event sdlEvent;
	int x,y;
	//mouse state
	int mouse_state; //tells which buttons are pressed
	Vector2 mouse_delta; //mouse movement in the last frame
	//keyboard state
	Uint8* keystate;
	Vector2 mouse_position; //last mouse position
	bool mouse_locked; //tells if the mouse is locked (not seen)
	Plane* player;

public:
	Controller(void);
	~Controller(void);
	void mouseMovement();
	void onKeyPressed( SDL_KeyboardEvent event );
	void onMouseButton( SDL_MouseButtonEvent event );
	void update(float seconds_elapsed);
};

#endif